#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using i128 = __int128;
const int N = 1e6 + 5;
const int MOD = 998244353;

int d[N];  // d[i] 表示i的约数个数
ll S[N];   // S[i] 表示前缀和 a[1]+...+a[i]

void solve() {
    int n;
    cin >> n;

    // 第一步：计算每个数的约数个数d[i]
    for (int i = 1; i <= n; ++i) {
        for (int j = i; j <= n; j += i) {  // i是j的约数，所以d[j]++
            d[j]++;
        }
    }

    // 第二步：计算前缀和S[i]
    if (n >= 1) {
        S[1] = 1;  // a[1] = 1，故S[1] = 1
    }
    for (int i = 2; i <= n; ++i) {
        S[i] = (2 * S[i - 1] + d[i]) % MOD;
    }

    // 第三步：答案是a[n] = S[n] - S[n-1]
    if (n == 1) {
        cout << 1 << endl;
    } else {
        cout << (S[n] - S[n - 1] + MOD) % MOD << endl;
    }
    return;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    solve();

    return 0;
}